<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01_弹性布局入门</title>
    <style>
        .container{
            background-color: #ffd400;
            display: flex;/*弹性布局*/
            /*行模式*/
            flex-direction: row;
            /*列模式*/
            flex-direction: column;
            /*列模式反转*/
            flex-direction: row-reverse;
            /*行模式反转*/
            flex-direction: column-reverse;

            width: 500px;
            flex-wrap: nowrap;
            flex-wrap: wrap;
        }
        .item{
            background-color: red;
            width: 100px;
            height: 100px;
            font-size: 45px;
            border: 3px solid black;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
    <div class="item">5</div>
    <div class="item">6</div>
    <div class="item">7</div>
</div>

</body>
</html>